# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>

pkgname=libtirpc
pkgver=1.3.2
pkgrel=1
pkgdesc="Transport Independent RPC library (SunRPC replacement)"
arch=('x86_64')
url="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary"
license=('BSD')
depends=('krb5')
backup=('etc/netconfig')
# git tree: git://linux-nfs.org/~steved/libtirpc
source=(https://downloads.sourceforge.net/sourceforge/libtirpc/${pkgname}-${pkgver}.tar.bz2)
sha1sums=('51d75be0e5acc094a888f40042b23e128d163cb5')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --sysconf=/etc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -D -m644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
